Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing /
Chapter 4 - Advanced Printing Features / About Advanced Printing Features


Printer Objects

Each job object references two printer objects. One printer object specifies the output printer on which the document is printed. The other printer object defines the formatting printer that specifies how the document is formatted. A user chooses an output printer in the Print dialog box and a formatting printer in the Page Setup dialog box. When a job object is created, its output printer is the currently selected desktop printer, and the formatting printer is specified by the output printer's printer driver.

Each printer object has six accessible properties, as shown in Figure 4-1. Note that, because a printer object is a private data structure, the order of the properties as shown in Figure 4-1 is completely arbitrary. Properties in italics indicate references to other objects.

Figure 4-1 The printer object

The properties of a printer object are:

Table 4-1 Printer driver types

Table 4-1 shows the printer driver types defined by QuickDraw GX. Do not make assumptions about the kinds of service provided by a printer driver based on its type alone. For example, two PostScript drivers may be subtly different.
Table 4-1 Printer driver types
ConstantValueExplanation
gxAnyPrinterType'univ'Universal type of printer
gxRasterPrinterType'rast'Raster printer
gxPostscriptPrinterType'post'Postscript printer
gxVectorPrinterType'vect'Vector printer
gxPortableDocPrinterType'gxpd'Portable digital document maker
 '????'Unknown driver type

Note
You are responsible for registering your printer driver type with Developer Technical Support.

Printer View Devices

A printer object's view device list specifies the resolutions and color spaces that can be used with a printer. These view devices are created by the printer driver. Your application can access, but not change, these characteristics. The printer's resolution is stored in the view device's mapping property as the scaling factor. The printer's color space is stored in the bitmap shape that represents the imageable area of the device. A view device object contains other properties as well; however, these properties are not used in printing. For more information about view device objects, see the view-related objects chapter of Inside Macintosh: QuickDraw GX Objects.

For example, the LaserWriter IISC GX driver creates a view device list with only one view device, because the printer supports only one color space, black-and-white, and one resolution, 300 dots-per-inch. The view device's mapping property specifies a scaling factor of 4.17, both horizontally and vertically, to achieve the 300 dots-per-inch resolution. The scaling factor is determined by dividing the printer's resolution, 300 dots-per-inch, by 72, which represents the resolution when the scaling factor is 1.

As another example, the ImageWriter II GX printer driver supports printing at two resolutions in each of two color spaces:

The driver creates a view device list with four view device references. The printer driver sets up the mapping property in each view device to specify the correct scaling factor. For an example of how to obtain the scaling factor, see the section"Determining a Printer's Resolution" on page 4-26.

Note
A printer driver inherits a view device for a 72 dpi, 24-bit RGB color space from QuickDraw GX and modifies the list as necessary to include the view devices that the driver actually supports. For more information about writing a printer driver, see the printer driver chapter of Inside Macintosh: QuickDraw GX Printing Extensions and Drivers.

Color Matching for Printers

QuickDraw GX provides a color profile object that is used to specify color-matching information for a printer. The color profile object is discussed in the color and color-related objects chapter of Inside Macintosh: QuickDraw GX Objects. Your application can access the color profile object associated with a printer driver or a particular page of output or set these color profile objects using the following functions:
FunctionPurpose
GXFindPrinterProfileDetermine the color profile for a printer
GXFindFormatProfileDetermine the color profile for a format object
GXSetPrinterProfileSet the color profile for a printer
GXSetFormatProfileSet the color profile for a format object

For more information about these functions, see "Color Profile Functions" beginning on page 4-84. For an example of retrieving the color profile and color space from a view device, see "Retrieving the Color Profile and Color Space for a Printer" on page 4-27.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help